package no.sachmuld.methodcombination.examples.annotation.javastyle;

import no.sachmuld.methodcombination.api.MethodInvocation;

/**
 *
 */
public class FooY extends FooX {

    public FooY() {
        with(new FooBehaviour() {

            @Override
            public void bar(MethodInvocation<Void> methodInvocation) {
                System.out.println("FooY.beforeBar");
                methodInvocation.proceed();
                System.out.println("FooY.afterBar");
            }

        });
    }

    @Override
    public void baz() {
        System.out.println("FooY.beforeBaz");
        super.baz();
        System.out.println("FooY.afterBaz");
    }
}

